#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void sort(int* arr, int len)
{
	int i = 0; int j = 0;
	for (i = 0; i < len - 1; i++)
	{
		for (j = 0; j < len - 1; j++)
		{
			if (arr[j] < arr[j + 1])
			{
				int tmp = 0;
				tmp = arr[j + 1];
				arr[j + 1] = arr[j];
				arr[j] = tmp;
			}
		}
	}
}
int main()
{
	int n = 0; int arr[100];
	while (scanf("%d", &n) != EOF)
	{
		int i = 0;
		for (i = 0; i < n; i++)
		{
			scanf("%d", &arr[i]);
		}
		int len = sizeof(arr) / sizeof(arr[0]);
		sort(arr, len);
		int m = 0; scanf("%d", &m); int num = 0;
		for (i = 0; i < n; i++)
		{
			if (arr[i] == m)
			{
				num = i + 1; break;
			}
		}
		printf("%d\n", num);
	}
	return 0;
}